Skip to content

Refactor smoke test scripts and consolidate template checks#59

Merged
shibayan merged 1 commit intomasterfrom
optimize
Feb 28, 2026
Merged

Refactor smoke test scripts and consolidate template checks#59
shibayan merged 1 commit intomasterfrom
optimize

Conversation

@shibayan
Copy link
Owner

This pull request refactors the smoke test scripts and supporting files to improve maintainability and consistency across template-specific tests. The main changes include consolidating test utility usage, updating test scripts to use a new helper, and minor improvements to the GitHub action configuration.

Test script refactoring and consolidation:

  • Added a new helper script run-template-checks.sh to centralize common test logic, reducing duplication across all template-specific test scripts. Each test script now calls this helper instead of sourcing and manually invoking functions from test-utils.sh.
  • Updated all template-specific test scripts (test.sh files for dotnet, java, node, powershell, python) to use the new helper script, simplifying their structure and ensuring consistent test execution. [1] [2] [3] [4] [5]

Improvements to test utility usage:

  • Changed the copy logic in build.sh to copy all files from test/test-utils/ instead of just test-utils.sh, ensuring that the new helper script is available in the test environment.

GitHub action configuration updates:

  • Added a description to the smoke test GitHub action for clarity.
  • Removed the explicit checkout step from the smoke test GitHub action, streamlining the workflow.

@shibayan shibayan requested a review from Copilot February 28, 2026 11:34
@shibayan shibayan self-assigned this Feb 28, 2026
@shibayan shibayan added the enhancement New feature or request label Feb 28, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the smoke-test harness for Azure Functions devcontainer templates by centralizing common checks into a shared helper script and simplifying template-specific test.sh entrypoints, with small updates to the composite smoke-test action packaging.

Changes:

  • Added run-template-checks.sh helper to consolidate common template checks.
  • Updated all Azure Functions template test.sh scripts to call the helper instead of sourcing test-utils.sh directly.
  • Updated the smoke-test composite action to copy all test utilities into the test project and tweaked action.yml metadata/steps.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/test-utils/run-template-checks.sh New centralized runner that sources test-utils.sh and runs template + func checks.
test/azure-functions-python/test.sh Simplified to invoke centralized helper for python version check.
test/azure-functions-powershell/test.sh Simplified to invoke centralized helper for pwsh version check.
test/azure-functions-node/test.sh Simplified to invoke centralized helper for node version check.
test/azure-functions-java/test.sh Simplified to invoke centralized helper for java version check.
test/azure-functions-dotnet/test.sh Simplified to invoke centralized helper for dotnet version check.
.github/actions/smoke-test/build.sh Copies all files from test/test-utils/ into the test-project directory.
.github/actions/smoke-test/action.yml Adds a description and removes the internal checkout step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shibayan shibayan merged commit 8a9a8d7 into master Feb 28, 2026
15 checks passed
@shibayan shibayan deleted the optimize branch February 28, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants